function rep_area = gs_reparea(miX,maX,miY,maY,meEMAX,meEMIN,...
                sdEMAX,sdEMIN,mePHI,meTrE,meShE,meSIS,d0,nH,nM,nL)
%gs_reparea - ancillary function for the area-based report generation
%
%   rep_area = gs_reparea(miX,maX,miY,maY,meEMAX,meEMIN,...
%               sdEMAX,sdEMIN,mePHI,meTrE,meShE,meSIS,d0,nH,nM,nL)
%
% See also gs_strashow, StrainZero.

% G. Teza, 2022

if meEMAX >= 0
    typema = '(EXTENSION)';
else
    typema = '(COMPRESSION)';
end
if meEMIN >= 0
    typemi = '(EXTENSION)';
else
    typemi = '(COMPRESSION)';
end

rep_area = sprintf(...
    '\n%s:\n\n %s: %.0f m; \n %s\n %s: %f m -> %f m;\n %s: %f m -> %f m.\n\n %s:\n %s: %0.5g 1/y %s - %s: %0.5g 1/y;\n %s: %0.5g 1/y %s - %s: %0.5g 1/y;\n %s: %f°;\n %s: %0.5g 1/y;\n %s: %f;\n %s: %0.5g 1/y.\n\n %s: %d;\n %s: %d;\n %s: %d.',...
    'REPORT ON SELECTED AREA',...
    'SCALE FACTOR: ',d0,...
    'Coordinate limits',...
    'East',miX,maX,...
    'North',miY,maY,...
    'MEAN STRAIN RATES',...
    'MAXIMUM',meEMAX,typema,'STD',sdEMAX,...
    'MINIMUM',meEMIN,typemi,'STD',sdEMIN,...
    'AZIMUTH OF MAXIMUM STRAIN DIRECTION',mePHI,...
    'RATE OF CHANGE-IN-AREA (TRACE OF STRAIN RATE TENSOR)',meTrE,...
    'NORMALIZED SHEAR',meShE,...
    'SECOND INVARIANT OF STRAIN RATE',meSIS,...
    'GRID NODES IN HIGH SIGNIFICANCE AREA',nH,...
    'GRID NODES IN MID SIGNIFICANCE AREA',nM,...
    'GRID NODES IN LOW SIGNIFICANCE AREA',nL);